import 'package:aio/aio.dart';

/**
 * 通知单信息[确认收款]
 */
class PayNotice extends BaseBean {
  /// 通知单号
  String? NoticeId = null;

  /// 通知日期
  String? AddDate = null;

  /// 客户名称
  String? CustomerName = null;

  /// 收款单号
  String? ColCode = null;

  /// 收款日期
  String? ColDateTime = null;

  @override
  fromJson(Map<String, dynamic> json) {
    // TODO: implement fromJson
    NoticeId = json["NoticeId"]?.toString() ?? "";
    AddDate = json["AddDate"]?.toString() ?? "";
    CustomerName = json["CustomerName"]?.toString() ?? "";
    ColCode = json["ColCode"]?.toString() ?? "";
    ColDateTime = json["ColDateTime"]?.toString() ?? "";
  }

  @override
  instance() {
    // TODO: implement instance
    return PayNotice();
  }

  @override
  Map<String, dynamic> toJson() {
    // TODO: implement toJson
    var map = <String, dynamic>{};
    map["NoticeId"] = NoticeId;
    map["AddDate"] = AddDate;
    map["CustomerName"] = CustomerName;
    map["ColCode"] = ColCode;
    map["ColDateTime"] = ColDateTime;
    return map;
  }
}

///确认收款；收款明细
class PayNoticeDetail extends BaseBean {
  /// 合同号
  String? ContractCode = null;

  /// 合同外部编号
  String? OutCode = null;

  /// 项目名称
  String? ProjectName = null;

  /// 销售经理
  String? SalesmanName = null;

  /// 客服经理
  String? MerchandiserName = null;

  /// 最后发货时间
  String? LastDeliveryDateTime = null;

  /// 收款超期时间
  String? OverdueDateTimeName = null;

  /// 提成扣除比例
  String? Cutrate = null;

  ///收款超期时间 选择
  List<OverdueRate>? OverdueRateList = null;

  /// 收款类型
  String? ColTypeName = null;

  /// 收款方式
  String? ColMethodName = null;

  /// 实付金额
  String? Receivables = null;

  /// 开票应收款总额
  String? AmountInArear = null;

  /// 开票应收款余额
  String? Arrears = null;

  /// 预付款总额
  String? AdvancePaymentAmount = null;

  ///预付款余额
  String? AdvancePaymentArrears = null;

  ///预付款冲抵类型
  String? AdvancePaymentType = null;

  ///预付款冲抵
  String? AdvancePaymentOffset = null;

  ///汇率
  String? Erate = null;

  ///收款金额
  String? ColAmount = null;

  ///备注
  String? Intro = null;

  @override
  fromJson(Map<String, dynamic> json) {
    // TODO: implement fromJson
    ContractCode = json["ContractCode"]?.toString() ?? "";
    OutCode = json["OutCode"]?.toString() ?? "";
    ProjectName = json["ProjectName"]?.toString() ?? "";
    SalesmanName = json["SalesmanName"]?.toString() ?? "";
    MerchandiserName = json["MerchandiserName"]?.toString() ?? "";
    LastDeliveryDateTime = json["LastDeliveryDateTime"]?.toString() ?? "";
    OverdueDateTimeName = json["OverdueDateTimeName"]?.toString() ?? "";
    Cutrate = json["Cutrate"]?.toString() ?? "";
    OverdueRateList = setGenericFromJson(
        json, "OverdueRateList", <OverdueRate>[], OverdueRate());
    ColTypeName = json["ColTypeName"]?.toString() ?? "";
    ColMethodName = json["ColMethodName"]?.toString() ?? "";
    Receivables = json["Receivables"]?.toString() ?? "";
    AmountInArear = json["AmountInArear"]?.toString() ?? "";
    Arrears = json["Arrears"]?.toString() ?? "";
    AdvancePaymentAmount = json["AdvancePaymentAmount"]?.toString() ?? "";
    AdvancePaymentArrears = json["AdvancePaymentArrears"]?.toString() ?? "";
    AdvancePaymentType = json["AdvancePaymentType"]?.toString() ?? "";
    AdvancePaymentOffset = json["AdvancePaymentOffset"]?.toString() ?? "";
    Erate = json["Erate"]?.toString() ?? "";
    ColAmount = json["ColAmount"]?.toString() ?? "";
    Intro = json["Intro"]?.toString() ?? "";
  }

  @override
  instance() {
    // TODO: implement instance
    return PayNoticeDetail();
  }

  @override
  Map<String, dynamic> toJson() {
    // TODO: implement toJson
    var map = <String, dynamic>{};
    map["ContractCode"] = ContractCode;
    map["OutCode"] = OutCode;
    map["ProjectName"] = ProjectName;
    map["SalesmanName"] = SalesmanName;
    map["MerchandiserName"] = MerchandiserName;
    map["LastDeliveryDateTime"] = LastDeliveryDateTime;
    map["OverdueDateTimeName"] = OverdueDateTimeName;
    map["Cutrate"] = Cutrate;
    map["OverdueRateList"] = OverdueRateList;
    map["ColTypeName"] = ColTypeName;
    map["ColMethodName"] = ColMethodName;
    map["Receivables"] = Receivables;
    map["AmountInArear"] = AmountInArear;
    map["Arrears"] = Arrears;
    map["AdvancePaymentAmount"] = AdvancePaymentAmount;
    map["AdvancePaymentArrears"] = AdvancePaymentArrears;
    map["AdvancePaymentType"] = AdvancePaymentType;
    map["AdvancePaymentOffset"] = AdvancePaymentOffset;
    map["Erate"] = Erate;
    map["ColAmount"] = ColAmount;
    map["Intro"] = Intro;
    return map;
  }
}

class OverdueRate extends RollerBean {
  /// 收款超期时间
  String? OverdueDateTime = null;

  /// 收款超期时间；未超期，超期三个月，超期四个月
  String? OverdueDateTimeName = null;

  /// 提成扣除比例
  String? Cutrate = null;

  @override
  fromJson(Map<String, dynamic> json) {
    // TODO: implement fromJson
    OverdueDateTime = json["OverdueDateTime"]?.toString() ?? "";
    OverdueDateTimeName = json["OverdueDateTimeName"]?.toString() ?? "";
    Cutrate = json["Cutrate"]?.toString() ?? "";
    key = OverdueDateTime;
    value = OverdueDateTimeName;
  }

  @override
  instance() {
    // TODO: implement instance
    return OverdueRate();
  }

  @override
  Map<String, dynamic> toJson() {
    // TODO: implement toJson
    var map = <String, dynamic>{};
    map["OverdueDateTime"] = OverdueDateTime;
    map["OverdueDateTimeName"] = OverdueDateTimeName;
    map["Cutrate"] = Cutrate;
    return map;
  }
}
